package com.hua.designpattern.behavioral.interpreter;

public class NonterminalExpressionMultiply implements NonterminalExpression {

	private InterpreterInterface leftExpression;

	private InterpreterInterface rightExpression;

	public NonterminalExpressionMultiply(InterpreterInterface leftExpression, InterpreterInterface rightExpression) {
		super();
		this.leftExpression = leftExpression;
		this.rightExpression = rightExpression;
	}

	@Override
	public double interpreter(String context) {
		return leftExpression.interpreter(context) * rightExpression.interpreter(context);
	}

}
